package com.atguigu.tingshu.account.mapper;

import com.atguigu.tingshu.model.account.UserAccountDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

@Mapper
public interface UserAccountDetailMapper extends BaseMapper<UserAccountDetail> {

    /**
     * 保存用户账户明细
     *
     * @param userId    用户ID
     * @param title     交易标题
     * @param tradeType 交易类型
     * @param amount    金额
     * @param orderNo   订单号
     */
    void saveUserAccountDetail(@Param("userId") Long userId,
            @Param("title") String title,
            @Param("tradeType") String tradeType,
            @Param("amount") BigDecimal amount,
            @Param("orderNo") String orderNo);

}
